<?php


abstract class BaseJob extends BaseObject  implements Persistent {


	
	protected static $peer;


	
	protected $id;


	
	protected $member_id;


	
	protected $war;


	
	protected $mnk;


	
	protected $whm;


	
	protected $blm;


	
	protected $rdm;


	
	protected $thf;


	
	protected $pld;


	
	protected $drk;


	
	protected $rng;


	
	protected $brd;


	
	protected $bst;


	
	protected $drg;


	
	protected $smn;


	
	protected $nin;


	
	protected $sam;


	
	protected $blu;


	
	protected $cor;


	
	protected $pup;


	
	protected $dnc;


	
	protected $sch;

	
	protected $alreadyInSave = false;

	
	protected $alreadyInValidation = false;

	
	public function getId()
	{

		return $this->id;
	}

	
	public function getMemberId()
	{

		return $this->member_id;
	}

	
	public function getWar()
	{

		return $this->war;
	}

	
	public function getMnk()
	{

		return $this->mnk;
	}

	
	public function getWhm()
	{

		return $this->whm;
	}

	
	public function getBlm()
	{

		return $this->blm;
	}

	
	public function getRdm()
	{

		return $this->rdm;
	}

	
	public function getThf()
	{

		return $this->thf;
	}

	
	public function getPld()
	{

		return $this->pld;
	}

	
	public function getDrk()
	{

		return $this->drk;
	}

	
	public function getRng()
	{

		return $this->rng;
	}

	
	public function getBrd()
	{

		return $this->brd;
	}

	
	public function getBst()
	{

		return $this->bst;
	}

	
	public function getDrg()
	{

		return $this->drg;
	}

	
	public function getSmn()
	{

		return $this->smn;
	}

	
	public function getNin()
	{

		return $this->nin;
	}

	
	public function getSam()
	{

		return $this->sam;
	}

	
	public function getBlu()
	{

		return $this->blu;
	}

	
	public function getCor()
	{

		return $this->cor;
	}

	
	public function getPup()
	{

		return $this->pup;
	}

	
	public function getDnc()
	{

		return $this->dnc;
	}

	
	public function getSch()
	{

		return $this->sch;
	}

	
	public function setId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->id !== $v) {
			$this->id = $v;
			$this->modifiedColumns[] = JobPeer::ID;
		}

	} 
	
	public function setMemberId($v)
	{

		
		
		if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->member_id !== $v) {
			$this->member_id = $v;
			$this->modifiedColumns[] = JobPeer::MEMBER_ID;
		}

	} 
	
	public function setWar($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->war !== $v) {
			$this->war = $v;
			$this->modifiedColumns[] = JobPeer::WAR;
		}

	} 
	
	public function setMnk($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->mnk !== $v) {
			$this->mnk = $v;
			$this->modifiedColumns[] = JobPeer::MNK;
		}

	} 
	
	public function setWhm($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->whm !== $v) {
			$this->whm = $v;
			$this->modifiedColumns[] = JobPeer::WHM;
		}

	} 
	
	public function setBlm($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->blm !== $v) {
			$this->blm = $v;
			$this->modifiedColumns[] = JobPeer::BLM;
		}

	} 
	
	public function setRdm($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->rdm !== $v) {
			$this->rdm = $v;
			$this->modifiedColumns[] = JobPeer::RDM;
		}

	} 
	
	public function setThf($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->thf !== $v) {
			$this->thf = $v;
			$this->modifiedColumns[] = JobPeer::THF;
		}

	} 
	
	public function setPld($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->pld !== $v) {
			$this->pld = $v;
			$this->modifiedColumns[] = JobPeer::PLD;
		}

	} 
	
	public function setDrk($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->drk !== $v) {
			$this->drk = $v;
			$this->modifiedColumns[] = JobPeer::DRK;
		}

	} 
	
	public function setRng($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->rng !== $v) {
			$this->rng = $v;
			$this->modifiedColumns[] = JobPeer::RNG;
		}

	} 
	
	public function setBrd($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->brd !== $v) {
			$this->brd = $v;
			$this->modifiedColumns[] = JobPeer::BRD;
		}

	} 
	
	public function setBst($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->bst !== $v) {
			$this->bst = $v;
			$this->modifiedColumns[] = JobPeer::BST;
		}

	} 
	
	public function setDrg($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->drg !== $v) {
			$this->drg = $v;
			$this->modifiedColumns[] = JobPeer::DRG;
		}

	} 
	
	public function setSmn($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->smn !== $v) {
			$this->smn = $v;
			$this->modifiedColumns[] = JobPeer::SMN;
		}

	} 
	
	public function setNin($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->nin !== $v) {
			$this->nin = $v;
			$this->modifiedColumns[] = JobPeer::NIN;
		}

	} 
	
	public function setSam($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->sam !== $v) {
			$this->sam = $v;
			$this->modifiedColumns[] = JobPeer::SAM;
		}

	} 
	
	public function setBlu($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->blu !== $v) {
			$this->blu = $v;
			$this->modifiedColumns[] = JobPeer::BLU;
		}

	} 
	
	public function setCor($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->cor !== $v) {
			$this->cor = $v;
			$this->modifiedColumns[] = JobPeer::COR;
		}

	} 
	
	public function setPup($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->pup !== $v) {
			$this->pup = $v;
			$this->modifiedColumns[] = JobPeer::PUP;
		}

	} 
	
	public function setDnc($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->dnc !== $v) {
			$this->dnc = $v;
			$this->modifiedColumns[] = JobPeer::DNC;
		}

	} 
	
	public function setSch($v)
	{

		
		
		if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->sch !== $v) {
			$this->sch = $v;
			$this->modifiedColumns[] = JobPeer::SCH;
		}

	} 
	
	public function hydrate(ResultSet $rs, $startcol = 1)
	{
		try {

			$this->id = $rs->getInt($startcol + 0);

			$this->member_id = $rs->getInt($startcol + 1);

			$this->war = $rs->getString($startcol + 2);

			$this->mnk = $rs->getString($startcol + 3);

			$this->whm = $rs->getString($startcol + 4);

			$this->blm = $rs->getString($startcol + 5);

			$this->rdm = $rs->getString($startcol + 6);

			$this->thf = $rs->getString($startcol + 7);

			$this->pld = $rs->getString($startcol + 8);

			$this->drk = $rs->getString($startcol + 9);

			$this->rng = $rs->getString($startcol + 10);

			$this->brd = $rs->getString($startcol + 11);

			$this->bst = $rs->getString($startcol + 12);

			$this->drg = $rs->getString($startcol + 13);

			$this->smn = $rs->getString($startcol + 14);

			$this->nin = $rs->getString($startcol + 15);

			$this->sam = $rs->getString($startcol + 16);

			$this->blu = $rs->getString($startcol + 17);

			$this->cor = $rs->getString($startcol + 18);

			$this->pup = $rs->getString($startcol + 19);

			$this->dnc = $rs->getString($startcol + 20);

			$this->sch = $rs->getString($startcol + 21);

			$this->resetModified();

			$this->setNew(false);

						return $startcol + 22; 
		} catch (Exception $e) {
			throw new PropelException("Error populating Job object", $e);
		}
	}

	
	public function delete($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("This object has already been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(JobPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			JobPeer::doDelete($this, $con);
			$this->setDeleted(true);
			$con->commit();
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	public function save($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("You cannot save an object that has been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(JobPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			$affectedRows = $this->doSave($con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	protected function doSave($con)
	{
		$affectedRows = 0; 		if (!$this->alreadyInSave) {
			$this->alreadyInSave = true;


						if ($this->isModified()) {
				if ($this->isNew()) {
					$pk = JobPeer::doInsert($this, $con);
					$affectedRows += 1; 										 										 
					$this->setId($pk);  
					$this->setNew(false);
				} else {
					$affectedRows += JobPeer::doUpdate($this, $con);
				}
				$this->resetModified(); 			}

			$this->alreadyInSave = false;
		}
		return $affectedRows;
	} 
	
	protected $validationFailures = array();

	
	public function getValidationFailures()
	{
		return $this->validationFailures;
	}

	
	public function validate($columns = null)
	{
		$res = $this->doValidate($columns);
		if ($res === true) {
			$this->validationFailures = array();
			return true;
		} else {
			$this->validationFailures = $res;
			return false;
		}
	}

	
	protected function doValidate($columns = null)
	{
		if (!$this->alreadyInValidation) {
			$this->alreadyInValidation = true;
			$retval = null;

			$failureMap = array();


			if (($retval = JobPeer::doValidate($this, $columns)) !== true) {
				$failureMap = array_merge($failureMap, $retval);
			}



			$this->alreadyInValidation = false;
		}

		return (!empty($failureMap) ? $failureMap : true);
	}

	
	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = JobPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->getByPosition($pos);
	}

	
	public function getByPosition($pos)
	{
		switch($pos) {
			case 0:
				return $this->getId();
				break;
			case 1:
				return $this->getMemberId();
				break;
			case 2:
				return $this->getWar();
				break;
			case 3:
				return $this->getMnk();
				break;
			case 4:
				return $this->getWhm();
				break;
			case 5:
				return $this->getBlm();
				break;
			case 6:
				return $this->getRdm();
				break;
			case 7:
				return $this->getThf();
				break;
			case 8:
				return $this->getPld();
				break;
			case 9:
				return $this->getDrk();
				break;
			case 10:
				return $this->getRng();
				break;
			case 11:
				return $this->getBrd();
				break;
			case 12:
				return $this->getBst();
				break;
			case 13:
				return $this->getDrg();
				break;
			case 14:
				return $this->getSmn();
				break;
			case 15:
				return $this->getNin();
				break;
			case 16:
				return $this->getSam();
				break;
			case 17:
				return $this->getBlu();
				break;
			case 18:
				return $this->getCor();
				break;
			case 19:
				return $this->getPup();
				break;
			case 20:
				return $this->getDnc();
				break;
			case 21:
				return $this->getSch();
				break;
			default:
				return null;
				break;
		} 	}

	
	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = JobPeer::getFieldNames($keyType);
		$result = array(
			$keys[0] => $this->getId(),
			$keys[1] => $this->getMemberId(),
			$keys[2] => $this->getWar(),
			$keys[3] => $this->getMnk(),
			$keys[4] => $this->getWhm(),
			$keys[5] => $this->getBlm(),
			$keys[6] => $this->getRdm(),
			$keys[7] => $this->getThf(),
			$keys[8] => $this->getPld(),
			$keys[9] => $this->getDrk(),
			$keys[10] => $this->getRng(),
			$keys[11] => $this->getBrd(),
			$keys[12] => $this->getBst(),
			$keys[13] => $this->getDrg(),
			$keys[14] => $this->getSmn(),
			$keys[15] => $this->getNin(),
			$keys[16] => $this->getSam(),
			$keys[17] => $this->getBlu(),
			$keys[18] => $this->getCor(),
			$keys[19] => $this->getPup(),
			$keys[20] => $this->getDnc(),
			$keys[21] => $this->getSch(),
		);
		return $result;
	}

	
	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = JobPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->setByPosition($pos, $value);
	}

	
	public function setByPosition($pos, $value)
	{
		switch($pos) {
			case 0:
				$this->setId($value);
				break;
			case 1:
				$this->setMemberId($value);
				break;
			case 2:
				$this->setWar($value);
				break;
			case 3:
				$this->setMnk($value);
				break;
			case 4:
				$this->setWhm($value);
				break;
			case 5:
				$this->setBlm($value);
				break;
			case 6:
				$this->setRdm($value);
				break;
			case 7:
				$this->setThf($value);
				break;
			case 8:
				$this->setPld($value);
				break;
			case 9:
				$this->setDrk($value);
				break;
			case 10:
				$this->setRng($value);
				break;
			case 11:
				$this->setBrd($value);
				break;
			case 12:
				$this->setBst($value);
				break;
			case 13:
				$this->setDrg($value);
				break;
			case 14:
				$this->setSmn($value);
				break;
			case 15:
				$this->setNin($value);
				break;
			case 16:
				$this->setSam($value);
				break;
			case 17:
				$this->setBlu($value);
				break;
			case 18:
				$this->setCor($value);
				break;
			case 19:
				$this->setPup($value);
				break;
			case 20:
				$this->setDnc($value);
				break;
			case 21:
				$this->setSch($value);
				break;
		} 	}

	
	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = JobPeer::getFieldNames($keyType);

		if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
		if (array_key_exists($keys[1], $arr)) $this->setMemberId($arr[$keys[1]]);
		if (array_key_exists($keys[2], $arr)) $this->setWar($arr[$keys[2]]);
		if (array_key_exists($keys[3], $arr)) $this->setMnk($arr[$keys[3]]);
		if (array_key_exists($keys[4], $arr)) $this->setWhm($arr[$keys[4]]);
		if (array_key_exists($keys[5], $arr)) $this->setBlm($arr[$keys[5]]);
		if (array_key_exists($keys[6], $arr)) $this->setRdm($arr[$keys[6]]);
		if (array_key_exists($keys[7], $arr)) $this->setThf($arr[$keys[7]]);
		if (array_key_exists($keys[8], $arr)) $this->setPld($arr[$keys[8]]);
		if (array_key_exists($keys[9], $arr)) $this->setDrk($arr[$keys[9]]);
		if (array_key_exists($keys[10], $arr)) $this->setRng($arr[$keys[10]]);
		if (array_key_exists($keys[11], $arr)) $this->setBrd($arr[$keys[11]]);
		if (array_key_exists($keys[12], $arr)) $this->setBst($arr[$keys[12]]);
		if (array_key_exists($keys[13], $arr)) $this->setDrg($arr[$keys[13]]);
		if (array_key_exists($keys[14], $arr)) $this->setSmn($arr[$keys[14]]);
		if (array_key_exists($keys[15], $arr)) $this->setNin($arr[$keys[15]]);
		if (array_key_exists($keys[16], $arr)) $this->setSam($arr[$keys[16]]);
		if (array_key_exists($keys[17], $arr)) $this->setBlu($arr[$keys[17]]);
		if (array_key_exists($keys[18], $arr)) $this->setCor($arr[$keys[18]]);
		if (array_key_exists($keys[19], $arr)) $this->setPup($arr[$keys[19]]);
		if (array_key_exists($keys[20], $arr)) $this->setDnc($arr[$keys[20]]);
		if (array_key_exists($keys[21], $arr)) $this->setSch($arr[$keys[21]]);
	}

	
	public function buildCriteria()
	{
		$criteria = new Criteria(JobPeer::DATABASE_NAME);

		if ($this->isColumnModified(JobPeer::ID)) $criteria->add(JobPeer::ID, $this->id);
		if ($this->isColumnModified(JobPeer::MEMBER_ID)) $criteria->add(JobPeer::MEMBER_ID, $this->member_id);
		if ($this->isColumnModified(JobPeer::WAR)) $criteria->add(JobPeer::WAR, $this->war);
		if ($this->isColumnModified(JobPeer::MNK)) $criteria->add(JobPeer::MNK, $this->mnk);
		if ($this->isColumnModified(JobPeer::WHM)) $criteria->add(JobPeer::WHM, $this->whm);
		if ($this->isColumnModified(JobPeer::BLM)) $criteria->add(JobPeer::BLM, $this->blm);
		if ($this->isColumnModified(JobPeer::RDM)) $criteria->add(JobPeer::RDM, $this->rdm);
		if ($this->isColumnModified(JobPeer::THF)) $criteria->add(JobPeer::THF, $this->thf);
		if ($this->isColumnModified(JobPeer::PLD)) $criteria->add(JobPeer::PLD, $this->pld);
		if ($this->isColumnModified(JobPeer::DRK)) $criteria->add(JobPeer::DRK, $this->drk);
		if ($this->isColumnModified(JobPeer::RNG)) $criteria->add(JobPeer::RNG, $this->rng);
		if ($this->isColumnModified(JobPeer::BRD)) $criteria->add(JobPeer::BRD, $this->brd);
		if ($this->isColumnModified(JobPeer::BST)) $criteria->add(JobPeer::BST, $this->bst);
		if ($this->isColumnModified(JobPeer::DRG)) $criteria->add(JobPeer::DRG, $this->drg);
		if ($this->isColumnModified(JobPeer::SMN)) $criteria->add(JobPeer::SMN, $this->smn);
		if ($this->isColumnModified(JobPeer::NIN)) $criteria->add(JobPeer::NIN, $this->nin);
		if ($this->isColumnModified(JobPeer::SAM)) $criteria->add(JobPeer::SAM, $this->sam);
		if ($this->isColumnModified(JobPeer::BLU)) $criteria->add(JobPeer::BLU, $this->blu);
		if ($this->isColumnModified(JobPeer::COR)) $criteria->add(JobPeer::COR, $this->cor);
		if ($this->isColumnModified(JobPeer::PUP)) $criteria->add(JobPeer::PUP, $this->pup);
		if ($this->isColumnModified(JobPeer::DNC)) $criteria->add(JobPeer::DNC, $this->dnc);
		if ($this->isColumnModified(JobPeer::SCH)) $criteria->add(JobPeer::SCH, $this->sch);

		return $criteria;
	}

	
	public function buildPkeyCriteria()
	{
		$criteria = new Criteria(JobPeer::DATABASE_NAME);

		$criteria->add(JobPeer::ID, $this->id);

		return $criteria;
	}

	
	public function getPrimaryKey()
	{
		return $this->getId();
	}

	
	public function setPrimaryKey($key)
	{
		$this->setId($key);
	}

	
	public function copyInto($copyObj, $deepCopy = false)
	{

		$copyObj->setMemberId($this->member_id);

		$copyObj->setWar($this->war);

		$copyObj->setMnk($this->mnk);

		$copyObj->setWhm($this->whm);

		$copyObj->setBlm($this->blm);

		$copyObj->setRdm($this->rdm);

		$copyObj->setThf($this->thf);

		$copyObj->setPld($this->pld);

		$copyObj->setDrk($this->drk);

		$copyObj->setRng($this->rng);

		$copyObj->setBrd($this->brd);

		$copyObj->setBst($this->bst);

		$copyObj->setDrg($this->drg);

		$copyObj->setSmn($this->smn);

		$copyObj->setNin($this->nin);

		$copyObj->setSam($this->sam);

		$copyObj->setBlu($this->blu);

		$copyObj->setCor($this->cor);

		$copyObj->setPup($this->pup);

		$copyObj->setDnc($this->dnc);

		$copyObj->setSch($this->sch);


		$copyObj->setNew(true);

		$copyObj->setId(NULL); 
	}

	
	public function copy($deepCopy = false)
	{
				$clazz = get_class($this);
		$copyObj = new $clazz();
		$this->copyInto($copyObj, $deepCopy);
		return $copyObj;
	}

	
	public function getPeer()
	{
		if (self::$peer === null) {
			self::$peer = new JobPeer();
		}
		return self::$peer;
	}

} 